import java.util.Arrays;

public class Test8 {
    public static void main(String[] args) {
        int[] a = {12, 62, 53, 74, 8};
        System.out.println("排序前");
        for (int i=0;i<a.length;i++){
            System.out.println(a[i]);
        }
        int temp;
        for (int i = 0; i < a.length; i++) {
            for (int j = 0; j < a.length; j++) {
                if(a[j]>a[i]){
                    temp = a[i];
                    a[i] = a[j];
                    a[j] = temp;
                }
            }
        }
        System.out.println("排序后");
        for (int i=0;i<a.length;i++){
            System.out.println(a[i]);
        }
    }
}